package com.yxhl.zoume.utils.image;

import android.content.res.Resources;

import java.io.FileNotFoundException;
import java.io.InputStream;

public class ResourceImageDecoder extends ImageDecoder {
    private Resources mResources;
    private int mId;

    public ResourceImageDecoder(Resources res, int id) {
        mResources = res;
        mId = id;
    }

    @Override
    public InputStream getStream() throws FileNotFoundException {
        return mResources.openRawResource(mId);
    }
}
